/*
 * WVConstants.java
 *
 * Created by WindVane.
 * Copyright (c) 2014年 阿里巴巴-无线事业部. All rights reserved.
 */

package com.hybrid.utils;

/**
 * Title: Constant
 *
 * Description: WindVane 常量定义
 *
 * @author shihan.zsh
 *
 * @date 2014年9月26日
 */
public class WVConstants {

    /**
     * activity接入传参
     */
    public static final String INTENT_EXTRA_URL = "URL"; // 传递url参数的key值
    public static final String INTENT_EXTRA_DATA = "DATA"; // post数据

    /**
     * see {@link android.taobao.windvane.webview.ParamsParcelable}
     */
    public static final String INTENT_EXTRA_PARAMS = "PARAMS"; // 需要传递的参数

    /**
     * 域名规则
     */
    public static final String DEFAULT_DOMAIN_PATTERN = "^http[s]?://(?:[^/\\?#]+\\.)*(?:(?:taobao|tmall|juhuasuan|hitao|taobaocdn|alipay|etao|alibaba|aliyun|alimama|weibo|tanx|laiwang|alicdn|mmstat)\\.com|(?:tb|tbcdn|weibo)\\.cn|lwurl\\.to|tdd\\.la).*";

    /**
     * Cache 模块常量
     */
    public static final String LOCAL_CACHE_TAG = "_wvcrc=";
    public static final String LOCAL_CACHE_QUERY = "_wvcrc";
    public static final String WEBCACHE_FOLDER = "wvcache";
    public static final int DEFAULT_CACHE_CAPACITY = 250; // 缓存文件数
    public static final String IMAGE_CACHE_FOLDER = "wvimage";
    public static final int DEFAULT_IMAGE_CACHE_CAPACITY = 300; // 缓存圖片文件数
    public static final String RESOURCE_INFO = "yyz.config";

    /**
     * 其他模块
     */

    public static final String HTML_CONTENT = "html_content";
    public static final String CHARSET = "charset";
    public static final String MIMETYPE = "mimetype";
    public static final String WEBVIEW_MIMETYPE = "webview_mimetype";
    public static final String HTTPSVERIFYERROR = "httpsverifyerror";

    /**
     * HybridWebView 常量
     */

    public static final int UNSUPPORTED_MIMETYPE = -400;

    public static final int NOTIFY_PAGE_START = 400;
    public static final int NOTIFY_PAGE_FINISH = NOTIFY_PAGE_START + 1;
    public static final int NOTIFY_PAGE_ERROR = NOTIFY_PAGE_FINISH + 1;

    public static final int NOTIFY_TIME_OUT = NOTIFY_PAGE_ERROR + 1;
    public static final int NOTIFY_SAVE_IMAGE_SUCCESS = NOTIFY_TIME_OUT + 1;
    public static final int NOTIFY_SAVE_IMAGE_FAIL = NOTIFY_SAVE_IMAGE_SUCCESS + 1;
    public static final int NOTIFY_PAGE_PROGRESS = NOTIFY_SAVE_IMAGE_FAIL + 1;

    public static long  sTime = 0;

}
